#pragma once

#include "NeroEngine\NEntity.h"

namespace Game
{
	class NComponent;
}

namespace Game
{
class NGameEntity : public Engine::NEntity
{
	RTTI_DECLARATIONS(NGameEntity, Engine::NEntity)

public:
	typedef std::vector<NComponent*> ComponentList;

public:
	NGameEntity(void);
	
	virtual ~NGameEntity(void);

	virtual void Initialize();

	virtual void InitialCollision(void*);

	virtual void EndOfCollision(void*);

	virtual void Update(float deltaTime);

	void AddComponent(Game::NComponent* component);
	
	void RemoveComponets();

	virtual int Serialize(Core::NArchive ar);

	virtual int Deserialize(Core::NArchive ar);

protected:
	void (NGameEntity::*BeginCollision)(void*);

	void (NGameEntity::*EndCollision)(void*);

protected:
	ComponentList mComponents;
};
}